package com.ctg.itrdc.sysmgr.portal.data.impl;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

import org.springframework.stereotype.Component;

import com.ctg.itrdc.pasp.data.dao.BaseDao;
import com.ctg.itrdc.sysmgr.portal.data.IPrivGrantDao;
import com.ctg.itrdc.sysmgr.portal.data.entity.PrivGrant;

@Component("privGrantDao")
public class PrivGrantDaoImpl extends BaseDao<PrivGrant, Long> implements IPrivGrantDao {

	// PrivGrantDaoImpl中的批量删除之所以重新拼写Sql，是为了提高delete的效率
	// 如果使用BaseDao的delete去进行批量删除，那么删除一条记录就要访问一次库
	@Override
	public void batchDeleteByPrivIds(List<Long> idList, PrivGrant pg) {
		Map<String, Object> model = new HashMap<String, Object>(2);
		model.put("pg", pg);
		model.put("idList", idList);
		deleteBySqlId("batchDeleteByPrivIds", model, null);
	}
	
}